<?php

    $id = $_GET['id'];
    include "ProductDetails.php";
    include "ProductDetailsDao.php";
    include "Datasource.php";

    $tempProduct = new ProductDetails();
    $productDao = new ProductDetailsDao();
    $conn = new Datasource("localhost","theanykey","root","");

    $tempProduct = $productDao->getObject($conn, $id)

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body onload="postToForm();">



    </body>
    <script type="text/javascript">
        function postToForm()
        {
            w = window.opener;
            w.document.getElementById("id").value = <?php echo $tempProduct->getProductId(); ?>;
            window.close();

        }

    </script>
</html>
